// Package cmd @author <chengjiang@buffalo-robot.com>
// @date 2023/1/12
// @note
package cmd

import (
	"errors"
	"fmt"

	"github.com/spf13/cobra"
)

func init() {
	rootCmd.AddCommand(tryCmd)
}

var tryCmd = &cobra.Command{
	Use:   "err",
	Short: "Error Try and possibly fail at something",
	RunE: func(cmd *cobra.Command, args []string) error {
		//if err := someFunc(); err != nil {
		//	return err
		//}
		return errors.New(fmt.Sprintf("%v", args))
	},
}
